-- GENERATED SPELL FOR [Shadowforge Archaeologist] --


function spell0_4849(pUnit, Event) --@Defensive Stance,Self--
pUnit:FullCastSpellOnTarget(7164,pUnit)
pUnit:RegisterEvent('Sorts_4849', 574, 1)
end

function spell1_4849(pUnit, Event) --@Disarm,n/a--
pUnit:FullCastSpellOnTarget(6713,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4849', 5325, 1)
end

function spell2_4849(pUnit, Event) --@Shield Bash,n/a--
pUnit:FullCastSpellOnTarget(11972,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4849', 8319, 1)
end

function Sorts_4849(pUnit, Event)
local choix_sorts_4849 = math.random(0, 2)
if choix_sorts_4849 == 0 then
pUnit:RegisterEvent('spell0_4849', 1, 1)
end
if choix_sorts_4849 == 1 then
pUnit:RegisterEvent('spell1_4849', 1, 1)
end
if choix_sorts_4849 == 2 then
pUnit:RegisterEvent('spell2_4849', 1, 1)
end
end

function mob4849_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4849', math.random(1500, 3000), 1)
end

function mob4849_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4849_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4849_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4849, 1, 'mob4849_Action')
RegisterUnitEvent(4849, 2, 'mob4849_Leave')
RegisterUnitEvent(4849, 3, 'mob4849_Kill')
RegisterUnitEvent(4849, 4, 'mob4849_Die')
